package com.rybbaby.tss.platform.sysSchool.entity;

import com.rybbaby.tss.platform.sysAdminUser.entity.SysAdminUser;
import com.rybbaby.tss.platform.sysCitys.entity.SysCitys;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author 雷春琼
 * @description 园所
 * @createDate 2017-08-09 上午11:00:39
 */
@Entity
@Table(name = "sys_school")
@DynamicUpdate(true)
@DynamicInsert(true)
public class SysSchool implements Serializable {

    private static final long serialVersionUID = 6982060337299L;

    /**
     * 主键
     **/
    private String id;
    /**
     * 角色分组id
     **/
    private String roleGroupId;
    /**
     * 城市Id
     **/
    private String cityId;
    /**
     * 园所名称
     **/
    private String schoolName;
    /**
     * 园所编码
     **/
    private String schoolCode;
    /**
     * 当前操作者id
     **/
    private String createUserId;
    /**
     * 创建时间
     **/
    private java.sql.Timestamp createTime;
    /**
     * 修改时间
     **/
    private java.sql.Timestamp updateTime;
    /**
     * 版本
     **/
    private Integer version;
    /**
     * 城市
     **/
    private SysCitys sysCitys;

    /**
     * 园所所属省
     */
    private String schoolProvince;

    /**
     * 园所所属城市
     */
    private String schoolCity;

    /**
     * 园所所属城区
     */
    private String schoolRegion;

    /**
     * 园所详细地址
     */
    private String schoolAddress;
    /**
     * 合同编号
     */

    private String contractNum;
    /**
     * 园所座机
     */
    private String telephone;
    /**
     * 园所联系方式
     */
    private String schoolPhone;

    /**
     * 企业邮箱
     */
    private String enterpriseMail;

    /**
     * 园所QQ
     */
    private String schoolQQ;

    /** 园所类型 **/
    private Integer type;

    /**
     * 园所微信
     */
    private String schoolWeichat;

    /** 园所合同编码 **/
    private  String schoolContractCode;

    /**
     * 用户
     **/
    private SysAdminUser sysAdminUser;


    /**
     * 方法: 取得主键
     *
     * @return java.lang.String 主键
     */
    @Id
    @GeneratedValue(generator = "sys_schoolIDGenerator", strategy = GenerationType.AUTO)
    @GenericGenerator(name = "sys_schoolIDGenerator", strategy = "uuid")
    @Column(name = "id", nullable = false, length = 32)
    public String getId() {
        return this.id;
    }

    /**
     * 方法: 设置主键
     *
     * @param id 主键
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 方法: 取得城市Id
     *
     * @return java.lang.String 城市Id
     */
    @Column(name = "cityId", nullable = true, length = 32)
    public String getCityId() {
        return this.cityId;
    }

    /**
     * 方法: 设置城市Id
     *
     * @param cityId 城市Id
     */
    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    /**
     * 方法: 取得园所名称
     *
     * @return java.lang.String 园所名称
     */
    @Column(name = "schoolName", nullable = true, length = 100)
    public String getSchoolName() {
        return this.schoolName;
    }

    /**
     * 方法: 设置园所名称
     *
     * @param schoolName 园所名称
     */
    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    /**
     * 方法: 取得园所编码
     *
     * @return java.lang.String 园所编码
     */
    @Column(name = "schoolCode", nullable = true, length = 100)
    public String getSchoolCode() {
        return this.schoolCode;
    }

    /**
     * 方法: 设置园所编码
     *
     * @param schoolCode 园所编码
     */
    public void setSchoolCode(String schoolCode) {
        this.schoolCode = schoolCode;
    }


    /**
     * 方法: 取得当前操作者id
     *
     * @return java.lang.String 当前操作者id
     */
    @Column(name = "createUserId", nullable = true, length = 32)
    public String getCreateUserId() {
        return this.createUserId;
    }

    /**
     * 方法: 设置当前操作者id
     *
     * @param createUserId 当前操作者id
     */
    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * 方法: 取得创建时间
     *
     * @return java.sql.Timestamp 创建时间
     */
    @Column(name = "createTime", nullable = true, length = 19)
    public java.sql.Timestamp getCreateTime() {
        return this.createTime;
    }

    /**
     * 方法: 设置创建时间
     *
     * @param createTime 创建时间
     */
    public void setCreateTime(java.sql.Timestamp createTime) {
        this.createTime = createTime;
    }

    /**
     * 方法: 取得修改时间
     *
     * @return java.sql.Timestamp 修改时间
     */
    @Column(name = "updateTime", nullable = true, length = 19)
    public java.sql.Timestamp getUpdateTime() {
        return this.updateTime;
    }

    /**
     * 方法: 设置修改时间
     *
     * @param updateTime 修改时间
     */
    public void setUpdateTime(java.sql.Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 方法: 取得版本
     *
     * @return java.lang.Integer 版本
     */
    @Version
    @Column(name = "version", nullable = true, length = 11)
    public Integer getVersion() {
        return this.version;
    }

    /**
     * 方法: 设置版本
     *
     * @param version 版本
     */
    public void setVersion(Integer version) {
        this.version = version;
    }


    /**
     * 城市id
     *
     * @return
     */
    @JoinColumn(name = "cityId", insertable = false, updatable = false)
    @ManyToOne(fetch = FetchType.LAZY, targetEntity = SysCitys.class)
    public SysCitys getSysCitys() {
        return sysCitys;
    }

    public void setSysCitys(SysCitys sysCitys) {
        this.sysCitys = sysCitys;
    }

    /**
     * 用户id
     *
     * @return
     */
    @JoinColumn(name = "createUserId", insertable = false, updatable = false)
    @ManyToOne(fetch = FetchType.LAZY, targetEntity = SysAdminUser.class)
    public SysAdminUser getSysAdminUser() {
        return sysAdminUser;
    }

    public void setSysAdminUser(SysAdminUser sysAdminUser) {
        this.sysAdminUser = sysAdminUser;
    }

    @Column(name = "roleGroupId", nullable = true, length = 32)
    public String getRoleGroupId() {
        return roleGroupId;
    }

    public void setRoleGroupId(String roleGroupId) {
        this.roleGroupId = roleGroupId;
    }

    @Column(name = "schoolProvince", nullable = true, length = 20)
    public String getSchoolProvince() {
        return schoolProvince;
    }

    public void setSchoolProvince(String schoolProvince) {
        this.schoolProvince = schoolProvince;
    }
    @Column(name = "schoolCity", nullable = true, length = 20)
    public String getSchoolCity() {
        return schoolCity;
    }

    public void setSchoolCity(String schoolCity) {
        this.schoolCity = schoolCity;
    }
    @Column(name = "schoolRegion", nullable = true, length = 20)
    public String getSchoolRegion() {
        return schoolRegion;
    }

    public void setSchoolRegion(String schoolRegion) {
        this.schoolRegion = schoolRegion;
    }
    @Column(name = "schoolAddress", nullable = true, length = 50)
    public String getSchoolAddress() {
        return schoolAddress;
    }

    public void setSchoolAddress(String schoolAddress) {
        this.schoolAddress = schoolAddress;
    }
    @Column(name = "contractNum", nullable = true, length = 20)
    public String getContractNum() {
        return contractNum;
    }

    public void setContractNum(String contractNum) {
        this.contractNum = contractNum;
    }
    @Column(name = "telephone", nullable = true, length = 11)
    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }
    @Column(name = "schoolPhone", nullable = true, length = 11)
    public String getSchoolPhone() {
        return schoolPhone;
    }

    public void setSchoolPhone(String schoolPhone) {
        this.schoolPhone = schoolPhone;
    }
    @Column(name = "enterpriseMail", nullable = true, length = 50)
    public String getEnterpriseMail() {
        return enterpriseMail;
    }

    public void setEnterpriseMail(String enterpriseMail) {
        this.enterpriseMail = enterpriseMail;
    }
    @Column(name = "schoolQQ", nullable = true, length = 20)
    public String getSchoolQQ() {
        return schoolQQ;
    }

    public void setSchoolQQ(String schoolQQ) {
        this.schoolQQ = schoolQQ;
    }
    @Column(name = "schoolWeichat", nullable = true, length = 50)
    public String getSchoolWeichat() {
        return schoolWeichat;
    }

    public void setSchoolWeichat(String schoolWeichat) {
        this.schoolWeichat = schoolWeichat;
    }

    @Column(name = "type" , nullable = true, length = 11 )
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Column(name = "schoolContractCode", nullable = true, length = 32)
    public String getSchoolContractCode() {
        return schoolContractCode;
    }

    public void setSchoolContractCode(String schoolContractCode) {
        this.schoolContractCode = schoolContractCode;
    }
}